import { defineStore } from 'pinia'
import { getDistrictLeaderSelect } from '@/api/sys/leader'

const useLeaderStore = defineStore('LeaderStore', {
  state: () => ({
    list: [],
  }),
  actions: {
    getLeader() {
      getDistrictLeaderSelect().then(({ data }) => {
        this.list = data.data
      })
    },
    reset() {
      this.list = []
    },
  },
  getters: {},
})

export default useLeaderStore
